package com.vq.common;

import lombok.Data;

/**
 * <h1>响应类</h1>
 */
@Data
public class R<T> {
    Integer code;//编码
    T data;//数据
    String msg;//错误信息

    public R(Integer code) {
        this.code = code;
    }
    public R(String msg) {
        this.msg = msg;
    }
    public R(Integer code, T data) {
        this.code = code;
        this.data = data;
    }
    public R(Integer code, T data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public void setCodeAndDate(Integer code, T data) {
        this.code = code;
        this.data = data;
    }
    public void setAll(Integer code, T data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }
}
